<template>

	<view class="video-wrapper" :class="{ 'landscape': isLandscape }">
		<video src="https://zzb.zsszyf.com/75ffe47f-8cb7-4a33-add6-9c22449b534e.mp4" autoplay="true" id="myVideo"
			@fullscreenchange="handleFullscreenChange">
			<cover-view class="btnbox" @click="Fullvideo">全屏</cover-view>
			<cover-view class="btnbox" @click="exitFull">退出全屏</cover-view>
		</video>
	</view>
</template>
<script setup>
	const instance = getCurrentInstance();
	const videoContext = uni.createVideoContext("myVideo", instance);
	const exitFull = () => {
		videoContext.exitFullScreen()
	}
	const Fullvideo =()=>{
		videoContext.requestFullScreen(90);
	}
</script>

<style scoped>
	.btnbox{
		background-color: red;
		width: 100rpx;
		height: 40rpx;
		margin: 30rpx;
	}
</style>